package com.scm.biz.dao;

import java.util.List;

import com.scm.biz.bean.SysRole;
import com.scm.biz.query.SysRoleQuery;

public interface SysRoleDao {
	int deleteByPrimaryKey(Integer id);

	int insert(SysRole record);

	int insertSelective(SysRole record);

	public SysRole selectByPrimaryKey(Integer id);

	public SysRole selectByCode(String code);

	int updateByPrimaryKeySelective(SysRole record);

	int updateByPrimaryKey(SysRole record);

	List<SysRole> selectList(SysRoleQuery sysRoleQuery);

	
	/**
	 * 根据用户ID，查询用户所有角色
	 * 
	 * @param userId
	 * @return
	 */
	List<SysRole> selectListByUserId(int userId);
}